package com.rickpan.dto.response;

/**
 * API Key配置响应DTO
 */
public class ApiKeyResponse {

    private boolean hasApiKey;
    private String model;
    private String maskedApiKey;

    // 构造函数
    public ApiKeyResponse() {}

    public ApiKeyResponse(boolean hasApiKey, String model, String maskedApiKey) {
        this.hasApiKey = hasApiKey;
        this.model = model;
        this.maskedApiKey = maskedApiKey;
    }

    // Builder模式
    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private boolean hasApiKey;
        private String model;
        private String maskedApiKey;

        public Builder hasApiKey(boolean hasApiKey) {
            this.hasApiKey = hasApiKey;
            return this;
        }

        public Builder model(String model) {
            this.model = model;
            return this;
        }

        public Builder maskedApiKey(String maskedApiKey) {
            this.maskedApiKey = maskedApiKey;
            return this;
        }

        public ApiKeyResponse build() {
            return new ApiKeyResponse(hasApiKey, model, maskedApiKey);
        }
    }

    // Getter 和 Setter 方法
    public boolean isHasApiKey() {
        return hasApiKey;
    }

    public void setHasApiKey(boolean hasApiKey) {
        this.hasApiKey = hasApiKey;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getMaskedApiKey() {
        return maskedApiKey;
    }

    public void setMaskedApiKey(String maskedApiKey) {
        this.maskedApiKey = maskedApiKey;
    }

    @Override
    public String toString() {
        return "ApiKeyResponse{" +
                "hasApiKey=" + hasApiKey +
                ", model='" + model + '\'' +
                ", maskedApiKey='" + maskedApiKey + '\'' +
                '}';
    }
}
